The mosque was built by the "ruler by the command of God" in the Fatimid era in the monastery of St. Catherine to address the attacks that he was subjected to by opponents of the spread of the Islamic religion at that time, and the mosque was established two hundred feet high, and during the French campaign the leader "Napoleon Bonaparte" strengthened The structure of the fence.